package com.aphrodite.ui.widgets;

import javax.microedition.lcdui.Graphics;

/**
 * Neon Text effect
 * 
 * @author kentelt
 * 
 */
public final class NeonText extends TypingText {

	private int neonColor = 0xFFFFAA;

	public NeonText(Theme theme, String text) {
		super(theme, text);
	}

	public final void render(Graphics g) {
		if (!isVisible)
			return;
		capture(g, width, height, true);
		g.setColor(theme.fgColor);
		if (theme.bmFont == null) {
			g.setFont(theme.widgetFont);
			g.drawString(text, 2, 2, 0);
		} else {
			theme.bmFont.drawChars(g, charList, 0, index, 2, 2, 0);
		}
		drawTypedText(g, neonColor);
		release(g, width, height, true);

	}

	public final void setNeonColor(int color) {
		this.neonColor = color;
	}
}
